﻿//
// Generováno programem xsd.exe, upraveno.
//

using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Brjnk.GpxExplorer.Data.GPX.SerializationClasses
{
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    [System.Xml.Serialization.XmlRootAttribute("gpx", Namespace = "http://www.topografix.com/GPX/1/1", IsNullable = false)]
    public partial class gpxType
    {
        /// <remarks/>
        public metadataType metadata;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("wpt")]
        public List<wptType> wpt;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("rte")]
        public List<rteType> rte;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("trk")]
        public List<trkType> trk;

        /// <remarks/>
        public extensionsType extensions;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string version;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string creator;

        public gpxType()
        {
            this.version = "1.1";
        }
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class metadataType
    {
        /// <remarks/>
        public string name;

        /// <remarks/>
        public string desc;

        /// <remarks/>
        public personType author;

        /// <remarks/>
        public copyrightType copyright;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("link")]
        public List<linkType> link;

        /// <remarks/>
        public System.DateTime time;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool timeSpecified;

        /// <remarks/>
        public string keywords;

        /// <remarks/>
        public boundsType bounds;

        /// <remarks/>
        public extensionsType extensions;
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class personType
    {
        /// <remarks/>
        public string name;

        /// <remarks/>
        public emailType email;

        /// <remarks/>
        public linkType link;
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class emailType
    {
        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string id;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string domain;

        public override string ToString()
        {
            return string.Format("{0}@{1}", this.id, this.domain);
        }

        public static emailType FromString(string str)
        {
            var eml = new emailType();
            if (!str.Contains("@")) { eml.id = str; return eml; }
            var atPos = str.IndexOf("@");
            eml.id = str.Substring(0, atPos);
            eml.domain = str.Substring(Math.Min(atPos + 1, str.Length));
            return eml;
        }
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class trksegType
    {
        public trksegType()
        {
            trkpt = new List<wptType>();
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("trkpt")]
        public List<wptType> trkpt;

        /// <remarks/>
        public extensionsType extensions;
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class wptType
    {
        /// <remarks/>
        public decimal ele;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool eleSpecified;

        /// <remarks/>
        public System.DateTime time;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool timeSpecified;

        /// <remarks/>
        public decimal magvar;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool magvarSpecified;

        /// <remarks/>
        public decimal geoidheight;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool geoidheightSpecified;

        /// <remarks/>
        public string name;

        /// <remarks/>
        public string cmt;

        /// <remarks/>
        public string desc;

        /// <remarks/>
        public string src;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("link")]
        public List<linkType> link;

        /// <remarks/>
        public string sym;

        /// <remarks/>
        public string type;

        /// <remarks/>
        public fixType fix;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool fixSpecified;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(DataType = "nonNegativeInteger")]
        public string sat;

        /// <remarks/>
        public decimal hdop;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool hdopSpecified;

        /// <remarks/>
        public decimal vdop;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool vdopSpecified;

        /// <remarks/>
        public decimal pdop;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool pdopSpecified;

        /// <remarks/>
        public decimal ageofdgpsdata;

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool ageofdgpsdataSpecified;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(DataType = "integer")]
        public string dgpsid;

        /// <remarks/>
        public waypointExtensionsType extensions;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public decimal lat;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public decimal lon;
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class linkType
    {
        /// <remarks/>
        public string text;

        /// <remarks/>
        public string type;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
        public string href;
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public enum fixType
    {
        /// <remarks/>
        none,

        /// <remarks/>
        [System.Xml.Serialization.XmlEnumAttribute("2d")]
        Item2d,

        /// <remarks/>
        [System.Xml.Serialization.XmlEnumAttribute("3d")]
        Item3d,

        /// <remarks/>
        dgps,

        /// <remarks/>
        pps,
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class extensionsType
    {
        /// <remarks/>
        [System.Xml.Serialization.XmlAnyElementAttribute()]
        public System.Xml.XmlElement[] Any;
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class waypointExtensionsType
    {
        /// <remarks/>
        [System.Xml.Serialization.XmlAnyElementAttribute()]
        public System.Xml.XmlElement[] Any;

        #region groundspeak extension

        [System.Xml.Serialization.XmlElementAttribute("cache", Namespace = "http://www.groundspeak.com/cache/1/1")]
        public cache geocache;

        [System.Xml.Serialization.XmlElementAttribute("cache", Namespace = "http://www.groundspeak.com/cache/1/0")]
        public cache1_0 geocache1_0
        {
            get
            {
                if (geocache == null) return null;
                return new cache1_0(geocache);
            }
            set
            {
                geocache = value.WrappedData;
            }
        }

        [XmlIgnoreAttribute()]
        public bool geocacheSpecified
        {
            get { return (SerializationOptions.GroundspeakVersion & GroundspeakExtensionVersions.v1_1) > 0; }
            set { }
        }

        [XmlIgnoreAttribute()]
        public bool geocache1_0Specified
        {
            get { return (SerializationOptions.GroundspeakVersion & GroundspeakExtensionVersions.v1_0) > 0; }
            set { }
        }

        #endregion groundspeak extension

        #region garmin extension

        [System.Xml.Serialization.XmlElementAttribute("WaypointExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v3")]
        public WaypointExtension_t waypointExtension;

        [System.Xml.Serialization.XmlElementAttribute("RoutePointExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v3")]
        public RoutePointExtension_t routePointExtension;

        [System.Xml.Serialization.XmlElementAttribute("TrackPointExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v3")]
        public TrackPointExtension_t trackPointExtension;

        [System.Xml.Serialization.XmlElementAttribute("WaypointExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v2")]
        public WaypointExtension_t_v2 waypointExtension_v2
        {
            get
            {
                if (waypointExtension == null) return null;
                return new WaypointExtension_t_v2(waypointExtension);
            }
            set { waypointExtension = value.WrappedData; }
        }

        [System.Xml.Serialization.XmlElementAttribute("TrackPointExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v2")]
        public TrackPointExtension_t_v2 trackPointExtension_v2
        {
            get
            {
                if (trackPointExtension == null) return null;
                return new TrackPointExtension_t_v2(trackPointExtension);
            }
            set { trackPointExtension = value.WrappedData; }
        }

        [System.Xml.Serialization.XmlElementAttribute("WaypointExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v1")]
        public WaypointExtension_t_v1 waypointExtension_v1
        {
            get
            {
                if (waypointExtension == null) return null;
                return new WaypointExtension_t_v1(waypointExtension);
            }
            set { waypointExtension = value.WrappedData; }
        }

        [System.Xml.Serialization.XmlElementAttribute("TrackPointExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v1")]
        public TrackPointExtension_t_v1 trackPointExtension_v1
        {
            get
            {
                if (trackPointExtension == null) return null;
                return new TrackPointExtension_t_v1(trackPointExtension);
            }
            set { trackPointExtension = value.WrappedData; }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool waypointExtensionSpecified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v3) > 0; }
            set { }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool routePointExtensionSpecified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v3) > 0; }
            set { }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool trackPointExtensionSpecified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v3) > 0; }
            set { }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool waypointExtension_v2Specified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v2) > 0; }
            set { }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool trackPointExtension_v2Specified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v2) > 0; }
            set { }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool waypointExtension_v1Specified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v1) > 0; }
            set { }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool trackPointExtension_1Specified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v1) > 0; }
            set { }
        }

        #endregion garmin extension
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class routeExtensionsType
    {
        /// <remarks/>
        [System.Xml.Serialization.XmlAnyElementAttribute()]
        public System.Xml.XmlElement[] Any;

        #region garmin extension

        [System.Xml.Serialization.XmlElementAttribute("RouteExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v3")]
        public RouteExtension_t routeExtension;

        [System.Xml.Serialization.XmlElementAttribute("RouteExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v2")]
        public RouteExtension_t_v2 routeExtension_v2
        {
            get
            {
                if (routeExtension == null) return null;
                return new RouteExtension_t_v2(routeExtension);
            }
            set { routeExtension = value.WrappedData; }
        }

        [System.Xml.Serialization.XmlElementAttribute("RouteExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v1")]
        public RouteExtension_t_v1 routeExtension_v1
        {
            get
            {
                if (routeExtension == null) return null;
                return new RouteExtension_t_v1(routeExtension);
            }
            set { routeExtension = value.WrappedData; }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool routeExtensionSpecified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v3) > 0; }
            set { }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool routeExtension_v2Specified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v2) > 0; }
            set { }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool routeExtension_v1Specified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v1) > 0; }
            set { }
        }

        #endregion garmin extension
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class trackExtensionsType
    {
        /// <remarks/>
        [System.Xml.Serialization.XmlAnyElementAttribute()]
        public System.Xml.XmlElement[] Any;

        #region garmin extension

        [System.Xml.Serialization.XmlElementAttribute("TrackExtension", Namespace = "http://www.garmin.com/xmlschemas/GpxExtensions/v3")]
        public TrackExtension_t trackExtension;

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool trackExtensionSpecified
        {
            get { return (SerializationOptions.GarminVersion & GarminExtensionVersions.v3) > 0; }
            set { }
        }

        #endregion garmin extension
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class trkType
    {
        public trkType()
        {
            trkseg = new List<trksegType>();
        }

        /// <remarks/>
        public string name;

        /// <remarks/>
        public string cmt;

        /// <remarks/>
        public string desc;

        /// <remarks/>
        public string src;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("link")]
        public List<linkType> link;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(DataType = "nonNegativeInteger")]
        public string number;

        /// <remarks/>
        public string type;

        /// <remarks/>
        public trackExtensionsType extensions;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("trkseg")]
        public List<trksegType> trkseg;
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class rteType
    {
        public rteType()
        {
            rtept = new List<wptType>();
        }

        /// <remarks/>
        public string name;

        /// <remarks/>
        public string cmt;

        /// <remarks/>
        public string desc;

        /// <remarks/>
        public string src;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("link")]
        public List<linkType> link;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(DataType = "nonNegativeInteger")]
        public string number;

        /// <remarks/>
        public string type;

        /// <remarks/>
        public routeExtensionsType extensions;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("rtept")]
        public List<wptType> rtept;
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class boundsType
    {
        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public decimal minlat;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public decimal minlon;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public decimal maxlat;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public decimal maxlon;
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.topografix.com/GPX/1/1")]
    public partial class copyrightType
    {
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(DataType = "gYear")]
        public string year;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(DataType = "anyURI")]
        public string license;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string author;
    }
}